<script setup>
import { useRoute, useStore } from '@/utils/vueApi'
import { computed } from 'vue'
const props = defineProps(['isSub'])// 是否子项
const store = useStore()
const route = useRoute()

const { manage_project, manage_subkey } = store.getters.pageParmas
const indexCode = JSON.parse(localStorage.getItem('projectObject')).indexCode

const iframeUrl = computed(() => {
  if (!props.isSub) return `${manage_project.value}${indexCode}`
  if (props.isSub) return `${manage_subkey.value}${indexCode}`
})

</script>

<template>
  <iframe class="iframe-box" :src="iframeUrl" width="100%" height="100%" frameborder="0" />
</template>

<style>
.iframe-box {
  height: calc(100vh - 200px);
}
</style>
